<?php

declare(strict_types=1);

namespace App\Model;



/**
 * @property int $user_id 自增ID
 * @property int $parent_id 父级
 * @property string $username 真实姓名
 * @property string $head_img 头像
 * @property string $nickname 用户昵称
 * @property string $phone 手机号
 * @property string $balance 余额
 * @property string $openid 微信小程序openid
 * @property string $unionid 微信小程序unionid
 * @property string $password 用户密码
 * @property int $status 状态：1正常，0注销
 * @property \Carbon\Carbon $created_at 创建时间
 * @property \Carbon\Carbon $updated_at 更新时间
 */
class User extends Model
{
    protected string $primaryKey = 'user_id';
    /**
     * The table associated with the model.
     */
    protected ?string $table = 'user';

    /**
     * The attributes that are mass assignable.
     */
    protected array $fillable = ['user_id', 'parent_id', 'username', 'head_img', 'nickname', 'phone', 'balance', 'openid', 'unionid', 'password', 'status', 'created_at', 'updated_at'];

    /**
     * The attributes that should be cast to native types.
     */
    protected array $casts = ['user_id' => 'integer', 'parent_id' => 'integer', 'status' => 'integer', 'created_at' => 'datetime', 'updated_at' => 'datetime'];
}
